/* 
 * File:   outformat.h
 * Author: meng
 *
 * Created on May 5, 2011, 3:00 PM
 */

#ifndef OUTFORMAT_H
#define	OUTFORMAT_H

#include <iostream>
#include <vector>
#include <string>

using namespace std;


namespace opsrc {
    namespace stdf {
        class RecBase;
    }
}

using namespace opsrc::stdf;
using namespace std;

namespace opsrc {

    class OutFormat{

    public:
        //virtual OutFormat& operator<< (RecBase* rec) = 0;
        //virtual OutFormat& operator<< (string& msg) = 0;
        //virtual OutFormat& operator<< (int& value) = 0;
        //virtual OutFormat& operator<< (long& value) = 0;
        //virtual OutFormat& operator<< (float& value) = 0;
        
        virtual void out(RecBase* rec) = 0;
        virtual void out(string& msg) = 0;
        virtual void out(const char* msg) = 0;
        virtual void out(int value) = 0;
        virtual void out(float value) = 0;
        virtual void out(long value) = 0;
        virtual int outType() {
            return m_type;
        }
        virtual void open() = 0;
        virtual void close() = 0;
        virtual bool saveToFile(std::vector<RecBase*>, std::string){
            return false;
        }
    protected:
        int m_type;
        
    };

}  // ns opsrc

#endif	/* OUTFORMAT_H */

